home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Atari Mega Archive 1
/
Atari Mega Archive - Volume 1.iso
/
mint
/
utils
/
stlogin4.lzh
/
UTMP.H
< prev
next >
Wrap
C/C++ Source or Header
|
1993-04-25
|
2KB
|
58 lines
#ifndef _UTMP_INCLUDED /* allows multiple inclusion */
#define _UTMP_INCLUDED
#include <time.h>
#define UTMP_FILE "u:\\etc\\utmp"
#define WTMP_FILE "u:\\etc\\wtmp"
#define BTMP_FILE "u:\\etc\\btmp"
#define ut_name ut_user
struct utmp
{ char ut_user[8]; /* User login name */
char ut_id[4]; /* /etc/lines id(usually line #) */
char ut_line[15]; /* device name (console, lnxx) */
short ut_pid;
short ut_type; /* type of entry */
unsigned short ut_res1; /* Reserved for future use */
time_t ut_time; /* time entry was made */
};
/* Definitions for ut_type */
#define EMPTY 0
#define RUN_LVL 1
#define BOOT_TIME 2
#define OLD_TIME 3
#define NEW_TIME 4
#define INIT_PROCESS 5 /* Process spawned by "init" */
#define LOGIN_PROCESS 6 /* A "getty" process waiting for login */
#define USER_PROCESS 7 /* A user process */
#define DEAD_PROCESS 8
#define ACCOUNTING 9
#define UTMAXTYPE ACCOUNTING /* Largest legal value of ut_type */
/* Special strings or formats used in the "ut_line" field when
accounting for something other than a process.
No string for the ut_line field can be more than 11 chars +
a NULL in length.
*/
#define RUNLVL_MSG "run-level %c"
#define BOOT_MSG "system boot"
#define OTIME_MSG "old time"
#define NTIME_MSG "new time"
extern struct utmp *getutent(void);
extern struct utmp *getutid(struct utmp *);
extern struct utmp *getutline(struct utmp *);
extern void pututline(struct utmp *);
extern void setutent(void);
extern void endutent(void);
extern void utmpname(char *file);
extern int utmp_fd;
#endif /* _UTMP_INCLUDED */